package Cantella::DJabberd::Model::Admin::UserJid;

use Reaction::InterfaceModel::ObjectClass;

class UserJid, which {

  has jabber_groups =>
    (
     clearer        => '_clear_jabber_groups',
     domain_model   => '_user_jid_store',
     is             => 'ro',
     isa            => 'Cantella::DJabberd::Model::Admin::JabberGroup::Collection',
     lazy           => 1,
     orig_attr_name => 'jabber_groups',
     required       => 1,
     default        => sub {
       my $rs = shift->_user_jid_store->jabber_groups;
       Cantella::DJabberd::Model::Admin::JabberGroup::Collection->new( _source_resultset => $rs);
     },
    );

};

1;
